home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
choices
/
chcssml1.lha
/
MakeDepend
< prev
next >
Wrap
Text File
|
1989-02-06
|
392b
|
24 lines
#!/bin/sh
#
# Print dependencies for the given file.
# See the Makefile.
#
incdefs=
for arg
do
case $arg in
-D*|-I*) incdefs="$incdefs $arg"
shift
;;
*) break
;;
esac
done
for file in $*
do
ofile=`echo $file | sed -e 's/\.c$/.o/'`
sedexpr='/^# [0-9][0-9]* "\(.*\)"$/s//'$ofile': \1/p'
echo CC $incdefs $file 1>&2
CC -E $incdefs $file | sed -n "$sedexpr" | sort -u
done